﻿using Leo.Awesome.DictionaryManagement.DomainServices;
using Leo.Awesome.DictionaryManagement.MultiTenancy;
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.Localization;
using Volo.Abp.Modularity;
using Volo.Abp.MultiTenancy;

namespace Leo.Awesome.DictionaryManagement;

[DependsOn(
    typeof(DictionaryManagementDomainSharedModule)
)]
public class DictionaryManagementDomainModule : AbpModule
{
    public override void ConfigureServices(ServiceConfigurationContext context)
    {
        Configure<AbpLocalizationOptions>(options =>
        {
            options.Languages.Add(new LanguageInfo("en", "en", "English", "gb"));
            options.Languages.Add(new LanguageInfo("zh-Hans", "zh-Hans", "简体中文"));
            options.Languages.Add(new LanguageInfo("zh-Hant", "zh-Hant", "繁體中文"));
        });

        Configure<AbpMultiTenancyOptions>(options =>
        {
            options.IsEnabled = MultiTenancyConsts.IsEnabled;
        });
        context.Services.AddTransient<ISectionDataSeeder, DictionaryItemDataSeeder>();
    }
}
